package com.ruoyi.project.user.platformKkuserInfo.service.impl;

import com.ruoyi.common.utils.text.Convert;
import com.ruoyi.framework.aspectj.lang.annotation.DataSource;
import com.ruoyi.framework.aspectj.lang.enums.DataSourceType;
import com.ruoyi.project.user.platformKkuserInfo.domain.PlatformKkuserInfo;
import com.ruoyi.project.user.platformKkuserInfo.mapper.PlatformKkuserInfoMapper;
import com.ruoyi.project.user.platformKkuserInfo.service.IPlatformKkuserInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 用户信息Service业务层处理
 *
 * @author shixiangwen
 * @date 2022-10-11
 */
@Service
@DataSource(DataSourceType.ACCOUNT)
public class PlatformKkuserInfoServiceImpl implements IPlatformKkuserInfoService {
    @Autowired
    private PlatformKkuserInfoMapper platformKkuserInfoMapper;

    /**
     * 查询用户信息
     *
     * @param kkuid 用户信息ID
     * @return 用户信息
     */
    @Override
    public PlatformKkuserInfo selectPlatformKkuserInfoById(Long kkuid) {
        return platformKkuserInfoMapper.selectPlatformKkuserInfoById(kkuid);
    }

    /**
     * 查询用户信息列表
     *
     * @param platformKkuserInfo 用户信息
     * @return 用户信息
     */
    @Override
    public List<PlatformKkuserInfo> selectPlatformKkuserInfoList(PlatformKkuserInfo platformKkuserInfo) {
        return platformKkuserInfoMapper.selectPlatformKkuserInfoList(platformKkuserInfo);
    }

    /**
     * 新增用户信息
     *
     * @param platformKkuserInfo 用户信息
     * @return 结果
     */
    @Override
    public int insertPlatformKkuserInfo(PlatformKkuserInfo platformKkuserInfo) {
        return platformKkuserInfoMapper.insertPlatformKkuserInfo(platformKkuserInfo);
    }

    /**
     * 修改用户信息
     *
     * @param platformKkuserInfo 用户信息
     * @return 结果
     */
    @Override
    public int updatePlatformKkuserInfo(PlatformKkuserInfo platformKkuserInfo) {
        return platformKkuserInfoMapper.updatePlatformKkuserInfo(platformKkuserInfo);
    }

    /**
     * 删除用户信息对象
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deletePlatformKkuserInfoByIds(String ids) {
        return platformKkuserInfoMapper.deletePlatformKkuserInfoByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除用户信息信息
     *
     * @param kkuid 用户信息ID
     * @return 结果
     */
    @Override
    public int deletePlatformKkuserInfoById(Long kkuid) {
        return platformKkuserInfoMapper.deletePlatformKkuserInfoById(kkuid);
    }
}
